Differential D17250 Diff 47307 src/org/kde/kdeconnect/Plugins/RunCommandPlugin/RunCommandWidget.java
Changeset View
Changeset View
Standalone View
Standalone View
src/org/kde/kdeconnect/Plugins/RunCommandPlugin/RunCommandWidget.java
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Line(s) | 89 | try { | |||
---|---|---|---|---|---|
96 | Intent intent; | 96 | Intent intent; | ||
97 | 97 | | |||
98 | intent = new Intent(context, RunCommandWidget.class); | 98 | intent = new Intent(context, RunCommandWidget.class); | ||
99 | intent.setAction(SET_CURRENT_DEVICE); | 99 | intent.setAction(SET_CURRENT_DEVICE); | ||
100 | pendingIntent = PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); | 100 | pendingIntent = PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); | ||
101 | views.setOnClickPendingIntent(R.id.runcommandWidgetTitleHeader, pendingIntent); | 101 | views.setOnClickPendingIntent(R.id.runcommandWidgetTitleHeader, pendingIntent); | ||
102 | 102 | | |||
103 | if (getCurrentDevice() == null || !getCurrentDevice().isReachable()) { | 103 | if (getCurrentDevice() == null || !getCurrentDevice().isReachable()) { | ||
104 | views.setTextViewText(R.id.runcommandWidgetTitle, context.getString(R.string.pref_plugin_runcommand)); | 104 | views.setTextViewText(R.id.runcommandWidgetTitle, context.getString(R.string.plugin_runcommand)); | ||
105 | views.setViewVisibility(R.id.runcommandslist, View.GONE); | 105 | views.setViewVisibility(R.id.runcommandslist, View.GONE); | ||
106 | views.setViewVisibility(R.id.not_reachable_message, View.VISIBLE); | 106 | views.setViewVisibility(R.id.not_reachable_message, View.VISIBLE); | ||
107 | } else { | 107 | } else { | ||
108 | views.setTextViewText(R.id.runcommandWidgetTitle, getCurrentDevice().getName()); | 108 | views.setTextViewText(R.id.runcommandWidgetTitle, getCurrentDevice().getName()); | ||
109 | views.setViewVisibility(R.id.runcommandslist, View.VISIBLE); | 109 | views.setViewVisibility(R.id.runcommandslist, View.VISIBLE); | ||
110 | views.setViewVisibility(R.id.not_reachable_message, View.GONE); | 110 | views.setViewVisibility(R.id.not_reachable_message, View.GONE); | ||
111 | } | 111 | } | ||
112 | 112 | | |||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |